﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Util;

namespace Crawler
{
    public class PathManager
    {
        private String format_config = "config\\{0}\\config.xml";

        private String format_output;

        public PathManager() 
        {
            String output = ConfigUtil.GetAppSetting("output");
            format_output = output + "\\{0}";
        }

        public String GetConfigPath(String taskName) 
        {
            String path=String.Format(format_config, taskName);
            return path;
        }

        public String GetOutputPath(String taskName) 
        {
            String timestamp = DateTime.Now.ToString("yyMMdd");
            String path = String.Format(format_output, taskName)+"\\"+timestamp;
            return path;
        }
    }
}
